<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./node_modules/vue/dist/vue.js"></script>
  </head>

  <body>
    <div id="app">
      {{msg}}

      <Todolist :list="list" v-slot="data">
        <div>{{data.item}} + "auto"</div>
      </Todolist>
    </div>
    <script>
      const Todolist = {
        props: ["list"],
        template: `<div>todolist
          <ul>
            <li v-for="item in list">
              <slot :item="item">{{item}}</slot>
              </li>
            </ul>
          </div>`,
      };

      const app = new Vue({
        el: "#app",
        components: {
          Todolist,
        },
        data: {
          msg: "hello ",
          list: ["a", "b", "c"],
        },
      });
    </script>
  </body>
</html>
